const mongoose = require('mongoose');

let BookSchema = new mongoose.Schema({
    name:{
        type:String,
        required:true,
        unique:true
    },
    author: String,
    price:Number
})
//创建模型对象
let BookModel = mongoose.model('books',BookSchema);

module.exports = BookModel